<!DOCTYPE html>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<html>
<head>
    <meta charset="utf-8" >
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>MMS-OA</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo" style="font-size: large">湖南信息学院</div>

        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
                    谢梦华
                </a>
                <dl class="layui-nav-child">
                    <dd><a href="">基本资料</a></dd>
                    <dd><a href="">安全设置</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item"><a href="">退出</a></li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree"  lay-filter="test">
                <li class="layui-nav-item ">
                    <a class="" href="${ctx}/Login/add">新增成员</a>
                </li>
                <li class="layui-nav-item"><a href="${ctx}/Login/chaxun">信息查询</a> </li>

                <li class="layui-nav-item"><a href="${ctx}/Login/send">消息发布</a></li>
                <li class="layui-nav-item"><a href="${ctx}/Login/shenhe">审核</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <form class="layui-form" action="" method="POST" id="form1">
            <div class="layui-form-item">
                <label class="layui-form-label">姓名</label>
                <div class="layui-input-block">
                    <input type="text" name="uname" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">学号</label>
                <div class="layui-input-block">
                    <input type="text" name="usno" required  lay-verify="required" placeholder="请输入学号" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                    <input type="password" name="upassword" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">请记住密码</div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">职位</label>
                <div class="layui-input-block">
                    <select name="quanxian" lay-verify="required">
                        <option value=""></option>
                        <option value="0">普通社员</option>
                        <option value="1">副会长</option>
                        <option value="2">会长</option>
                        <option value="3">办公室成员</option>
                        <option value="4">办公室副主任</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">所属社团</label>
                <div class="layui-input-block">
                    <select name="mno" lay-verify="required">
                        <option value=""></option>
                        <option value="123">舞蹈协会</option>
                        <option value="456">软件协会</option>
                        <option value="1">社联</option>
                        <option value="789">足球协会</option>
                        <option value="124">吉他协会</option>
                    </select>
                </div>
            </div>
            <%--<div class="layui-form-item">--%>
                <%--<label class="layui-form-label">复选框</label>--%>
                <%--<div class="layui-input-block">--%>
                    <%--<input type="checkbox" name="like[write]" title="写作">--%>
                    <%--<input type="checkbox" name="like[read]" title="阅读" checked>--%>
                    <%--<input type="checkbox" name="like[dai]" title="发呆">--%>
                <%--</div>--%>
            <%--</div>--%>
            <div class="layui-form-item">
                <label class="layui-form-label">性别</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="男" title="男">
                    <input type="radio" name="sex" value="女" title="女" checked>
                </div>
            </div>
            <%--<div class="layui-form-item layui-form-text">--%>
                <%--<label class="layui-form-label">文本域</label>--%>
                <%--<div class="layui-input-block">--%>
                    <%--<textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>--%>
                <%--</div>--%>
            <%--</div>--%>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn bangding" id="sssss">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>


    </div>


    <div class="layui-footer">
        <!-- 底部固定区域 -->
        © 社联管理系统 - MMS-OA
    </div>
</div>

<script src="../js/jquery-1.11.3.min.js"></script>
<script src="../layui/layui.all.js"></script>
<script>
    <%--var form = layui.form--%>
    <%--var data=${loginVo};--%>

    <%--var json=data.flag;--%>
    <%--console.log(json);--%>
    <%--form.val('exmple',{--%>

    <%--});--%>


        $('#sssss').click(function () {
            $.ajax({
                //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "${ctx}/Save/saveMuser" ,//url
                data: $('#form1').serializeArray(),
                contentType:"application/x-www-form-urlencoded",
                async:true,
                success: function (result) {
                    console.log(result);//打印服务端返回的数据(调试用)
                    alert("新增成功");

                }
                // error : function() {
                //     alert("异常！");
                //   }
            });
       });

    <%--var str=${loginVo.muser.uid};--%>
    //JavaScript代码区域
//    layui.use('element', function(){
//        var element = layui.element;
//
//    });
</script>
</body>
</html>